package itcz.example.pattern.create_action.factory.factory_method;

/**
 * @ClassName: Client
 * @Author: ITCZ
 * @Date: 2025-04-26
 * @Description: 工程方法模式(8
 */
public class Client {
    public static void main(String[] args) {
        CoffeeStore coffeeStore = new CoffeeStore();
        CoffeeFactory factory = new AmericanCoffeeFactory();
        coffeeStore.setFactory(factory);
        Coffee coffee = coffeeStore.orderCoffee();
        System.out.println(coffee.getName());
    }
}
